package com.wangwei.modules.servlet.interceptor

import com.wangwei.modules.servlet.spring.HandlerInterceptor
import javax.servlet.http.HttpServletRequest
import javax.servlet.http.HttpServletResponse

class MyInterceptor : HandlerInterceptor {


	override fun preHandle(request: HttpServletRequest, response: HttpServletResponse, handler: Any): Boolean {
		var contentPath = request.url
		if (contentPath.startsWith("/user"))
			println("拦截器拦截到了User下的方法")
		return true
	}


	override fun afterCompletion(request: HttpServletRequest, response: HttpServletResponse, handler: Any, ex: Exception?) {

	}
}